package com.zsck.zsgy.ui.main.fragment.simplecircle.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.zsck.zsgy.R
import com.zsck.zsgy.databinding.ItemSimpleCircleBinding
import com.zsck.zsgy.ui.main.bean.SimpleCircleListBean
import com.zsck.zsgy.util.GlideUtils

class SimpleCircleAdapter :
    BaseQuickAdapter<SimpleCircleListBean.RowsBean, BaseDataBindingHolder<ItemSimpleCircleBinding>>(
        R.layout.item_simple_circle
    ) {


    override fun convert(
        holder: BaseDataBindingHolder<ItemSimpleCircleBinding>,
        item: SimpleCircleListBean.RowsBean
    ) {
        if(holder.dataBinding!=null){
            holder.dataBinding!!.simpleCircle = item

            if ( item.getFileId() != null) {
                GlideUtils.disPlayFromOSSWithConner(
                    item.getFileId(),
                    holder.dataBinding!!.ivIcon,
                    context,
                    13
                )
            }
        }

    }


}